// JScript File
function EmailFormatCheck(strEmail)
{
var firstFound=strEmail.indexOf("@");
var firstDot=strEmail.indexOf(".");
if(strEmail.indexOf(".")==0 || 
strEmail.lastIndexOf(".")==strEmail.length-1)
    return false;
else if (((strEmail.split("@")[0]).split(".")).length>1)
	return false;
else if (firstFound!=strEmail.lastIndexOf("@"))
	return false;
else if (strEmail.indexOf("..")>-1)
	return false;
else
	{		
	var strFirst=strEmail.split("@");
	var EmailCrap="~0`0|0!0@0#0$0%0^0&0*0(0)0+"+
	"0=0{0}0[0]0;0:0'0<0>0?0/0\\0\"0,0 ";
	var Crap=EmailCrap.split("0");
	var strFinal;
	if (strFirst.length>1)
	{
		var strSecond=(strEmail.split("@")[1]).split(".");
		var strFirst=(strEmail.split("@")[0]).split(".");
		if (strSecond.length>1)
		{
		strFinal=(strEmail.split("@")[0])+
		((strEmail.split("@")[1]).split(".")[0])+
		((strEmail.split("@")[1]).split(".")[1]);
		var found;
		var inVal=0;
		for (var index=0;index<Crap.length;index++)
			{
				found=strFinal.indexOf((Crap[index]));
				if (found!=-1)
					inVal=1;
			}
		if (inVal==1)
			{
				return false;
			}	
		else
			{
				return true;
			}	
		}
		else
			{
				return false;
			}	
		}
	else
		{
			return false;
		}	
	}
    return true;
}

